import request from '@/utils/request'

export function getList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}

export function addDepet(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

export function delDepet(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

export function getDepetById(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}

export function updateDepet(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
